package edu.ynu.se.xiecheng.achitectureclass.controller;

import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import edu.ynu.se.xiecheng.achitectureclass.dao.ShopDao;
import edu.ynu.se.xiecheng.achitectureclass.entity.Shop;
import edu.ynu.se.xiecheng.achitectureclass.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Shop")
public class ShopController extends LogicController<ShopService, ShopDao, Shop,Long> {
    public ShopController(@Autowired ShopService service) {
        super(service);
    }
    @Autowired
    private ShopService shopService;
    @PostMapping("/confirmOrder")
    public void confirmOrder(Long orderId) {
        shopService.confirmOrder(orderId);
    }
    @PostMapping("/refundOrder")
    public void refundOrder(Long orderId) {
        shopService.refundOrder(orderId);
    }
}
